﻿using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoUser315.Data.Model;
using System.ComponentModel.DataAnnotations.Schema;

namespace TodoUser315.Data
{
    public class TodoDbContext : IdentityDbContext<ApplicationUser>
    {
        // Constructor
        // connection string, 
        // + resolve any backward compatible
        public TodoDbContext()
            : base("TodoUserConnection", throwIfV1Schema: false)
        {

        }

        // Db Table
        //[Table(name: "Todoits")]
        public DbSet<Todo> Todos { get; set; }

        // Create a TodoDbContext object
        public static TodoDbContext Create()
        {
            return new TodoDbContext();
        }

    }
}
